/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ija.model.types;

/**
 *
 * @author Radis
 */
public enum FigureColor {
    BLACK, WHITE,UNKNOWN; 
    
    public static FigureColor getFromString(String s) {
        if(s.equalsIgnoreCase("UNKNOWN"))
            return UNKNOWN;
        else if(s.equalsIgnoreCase("BLACK"))
            return BLACK;
        else if(s.equalsIgnoreCase("WHITE"))
            return WHITE;
        
        return null;
    }
    
    @Override
    public String toString() {
        if(this == UNKNOWN)
            return "UNKNOWN";
        else if(this == BLACK)
            return "BLACK";
        else if (this == WHITE)
            return "WHITE";
        
        return null;
    }
}
